package org.example.springboot_s3.test;

import org.example.springboot_s3.pojo.address;
import org.example.springboot_s3.pojo.user;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/*
* 练习@Restcontroller响应的统一结构数据
*
* */
@RestController
@RequestMapping("URL")
public class p2 {
    //请求成功 可以返回ok
    @GetMapping("ok")
    public result ok() {
        //返回信息解读 首先静态方法直接调用 ok 返回的信息为 user类  其中包含address类
        return result.ok(new user("唐三",12,new address("平顶山","郏县")));
    }








}
